.chat-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #f0f2f5;
}

.chat-header {
    margin-bottom: 24px;
    text-align: center;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    min-height: 400px;
}

.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.message-item.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1890ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.message-item.user .message-avatar {
    background: #52c41a;
}

.message-item.ai .message-avatar {
    background: #722ed1;
}

.message-content {
    flex: 1;
    max-width: 70%;
}

.message-item.user .message-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.message-bubble {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.5;
}

.message-item.user .message-bubble {
    background: #1890ff;
    color: white;
}

.message-bubble.loading {
    background: #f0f0f0;
    color: #8c8c8c;
    font-style: italic;
}

.message-time {
    font-size: 12px;
    color: #8c8c8c;
    margin-top: 4px;
    text-align: right;
}

.message-item.user .message-time {
    text-align: right;
}

.message-item.ai .message-time {
    text-align: left;
}

.chat-input {
    padding: 16px;
    background: white;
    border-radius: 8px;
    border-top: 1px solid #f0f0f0;
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chat-page {
        padding: 16px;
    }

    .message-content {
        max-width: 85%;
    }

    .chat-messages {
        min-height: 300px;
    }
}